home *** CD-ROM | disk | FTP | other *** search
Unknown | 2004-01-13 | 10.6 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 00 00 00 00 00 00 | 7b a8 01 2f 2f 20 3d 3d |........|{..// ==|
|00000010| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000020| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000030| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000040| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000050| 3d 3d 0d 0a 2f 2f 09 47 | 55 49 54 61 62 43 6f 6e |==..//.G|UITabCon|
|00000060| 74 72 6f 6c 20 2d 20 54 | 68 69 73 20 63 6f 6e 74 |trol - T|his cont|
|00000070| 72 6f 6c 20 68 61 73 20 | 61 20 6e 75 6d 62 65 72 |rol has |a number|
|00000080| 20 6f 66 20 74 61 62 73 | 0d 0a 2f 2f 0d 0a 2f 2f | of tabs|..//..//|
|00000090| 20 20 57 72 69 74 74 65 | 6e 20 62 79 20 4a 6f 65 | Writte|n by Joe|
|000000a0| 20 57 69 6c 63 6f 78 0d | 0a 2f 2f 20 20 28 63 29 | Wilcox.|.// (c)|
|000000b0| 20 32 30 30 33 2c 20 45 | 70 69 63 20 47 61 6d 65 | 2003, E|pic Game|
|000000c0| 73 2c 20 49 6e 63 2e 20 | 20 41 6c 6c 20 52 69 67 |s, Inc. | All Rig|
|000000d0| 68 74 73 20 52 65 73 65 | 72 76 65 64 0d 0a 2f 2f |hts Rese|rved..//|
|000000e0| 0d 0a 2f 2f 09 4d 6f 64 | 69 66 69 65 64 20 62 79 |..//.Mod|ified by|
|000000f0| 20 52 6f 6e 20 50 72 65 | 73 74 65 6e 62 61 63 6b | Ron Pre|stenback|
|00000100| 0d 0a 2f 2f 20 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |..// ===|========|
|00000110| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000120| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000130| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000140| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 0d 0a 0d 0a 63 6c 61 |========|=....cla|
|00000150| 73 73 20 47 55 49 54 61 | 62 43 6f 6e 74 72 6f 6c |ss GUITa|bControl|
|00000160| 20 65 78 74 65 6e 64 73 | 20 47 55 49 4d 75 6c 74 | extends| GUIMult|
|00000170| 69 43 6f 6d 70 6f 6e 65 | 6e 74 0d 0a 09 4e 61 74 |iCompone|nt...Nat|
|00000180| 69 76 65 3b 0d 0a 0d 0a | 2f 2f 20 28 63 70 70 74 |ive;....|// (cppt|
|00000190| 65 78 74 29 0d 0a 2f 2f | 20 28 63 70 70 74 65 78 |ext)..//| (cpptex|
|000001a0| 74 29 0d 0a 2f 2f 20 28 | 63 70 70 74 65 78 74 29 |t)..// (|cpptext)|
|000001b0| 0d 0a 2f 2f 20 28 63 70 | 70 74 65 78 74 29 0d 0a |..// (cp|ptext)..|
|000001c0| 2f 2f 20 28 63 70 70 74 | 65 78 74 29 0d 0a 2f 2f |// (cppt|ext)..//|
|000001d0| 20 28 63 70 70 74 65 78 | 74 29 0d 0a 2f 2f 20 28 | (cpptex|t)..// (|
|000001e0| 63 70 70 74 65 78 74 29 | 0d 0a 2f 2f 20 28 63 70 |cpptext)|..// (cp|
|000001f0| 70 74 65 78 74 29 0d 0a | 2f 2f 20 28 63 70 70 74 |ptext)..|// (cppt|
|00000200| 65 78 74 29 0d 0a 2f 2f | 20 28 63 70 70 74 65 78 |ext)..//| (cpptex|
|00000210| 74 29 0d 0a 2f 2f 20 28 | 63 70 70 74 65 78 74 29 |t)..// (|cpptext)|
|00000220| 0d 0a 0d 0a 76 61 72 28 | 4d 65 6e 75 29 09 62 6f |....var(|Menu).bo|
|00000230| 6f 6c 09 09 09 09 62 44 | 6f 63 6b 50 61 6e 65 6c |ol....bD|ockPanel|
|00000240| 73 3b 09 09 2f 2f 20 49 | 66 20 74 72 75 65 2c 20 |s;..// I|f true, |
|00000250| 61 73 73 6f 63 69 61 74 | 65 64 20 70 61 6e 65 6c |associat|ed panel|
|00000260| 73 20 77 69 6c 6c 20 64 | 6f 63 6b 20 76 65 72 74 |s will d|ock vert|
|00000270| 69 63 61 6c 6c 79 20 77 | 69 74 68 20 74 68 69 73 |ically w|ith this|
|00000280| 20 63 6f 6e 74 72 6f 6c | 0d 0a 0d 0a 76 61 72 09 | control|....var.|
|00000290| 09 09 61 72 72 61 79 3c | 47 55 49 54 61 62 42 75 |..array<|GUITabBu|
|000002a0| 74 74 6f 6e 3e 20 54 61 | 62 53 74 61 63 6b 3b 0d |tton> Ta|bStack;.|
|000002b0| 0a 76 61 72 09 09 09 47 | 55 49 54 61 62 42 75 74 |.var...G|UITabBut|
|000002c0| 74 6f 6e 09 09 41 63 74 | 69 76 65 54 61 62 3b 0d |ton..Act|iveTab;.|
|000002d0| 0a 0d 0a 76 61 72 09 09 | 09 73 74 72 69 6e 67 09 |...var..|.string.|
|000002e0| 09 09 09 42 61 63 6b 67 | 72 6f 75 6e 64 53 74 79 |...Backg|roundSty|
|000002f0| 6c 65 4e 61 6d 65 3b 0d | 0a 76 61 72 09 09 09 47 |leName;.|.var...G|
|00000300| 55 49 53 74 79 6c 65 73 | 09 09 09 42 61 63 6b 67 |UIStyles|...Backg|
|00000310| 72 6f 75 6e 64 53 74 79 | 6c 65 3b 0d 0a 76 61 72 |roundSty|le;..var|
|00000320| 09 09 09 4d 61 74 65 72 | 69 61 6c 09 09 09 42 61 |...Mater|ial...Ba|
|00000330| 63 6b 67 72 6f 75 6e 64 | 49 6d 61 67 65 3b 0d 0a |ckground|Image;..|
|00000340| 76 61 72 09 09 09 66 6c | 6f 61 74 20 09 09 09 09 |var...fl|oat ....|
|00000350| 54 61 62 48 65 69 67 68 | 74 3b 0d 0a 76 61 72 09 |TabHeigh|t;..var.|
|00000360| 09 09 62 6f 6f 6c 09 09 | 09 09 62 46 69 6c 6c 53 |..bool..|..bFillS|
|00000370| 70 61 63 65 3b 0d 0a 0d | 0a 66 75 6e 63 74 69 6f |pace;...|.functio|
|00000380| 6e 20 49 6e 69 74 43 6f | 6d 70 6f 6e 65 6e 74 28 |n InitCo|mponent(|
|00000390| 47 55 49 43 6f 6e 74 72 | 6f 6c 6c 65 72 20 4d 79 |GUIContr|oller My|
|000003a0| 43 6f 6e 74 72 6f 6c 6c | 65 72 2c 20 47 55 49 43 |Controll|er, GUIC|
|000003b0| 6f 6d 70 6f 6e 65 6e 74 | 20 4d 79 4f 77 6e 65 72 |omponent| MyOwner|
|000003c0| 29 0d 0a 7b 0d 0a 0d 0a | 09 53 75 70 65 72 2e 49 |)..{....|.Super.I|
|000003d0| 6e 69 74 43 6f 6d 70 6f | 6e 65 6e 74 28 4d 79 43 |nitCompo|nent(MyC|
|000003e0| 6f 6e 74 72 6f 6c 6c 65 | 72 2c 20 4d 79 4f 77 6e |ontrolle|r, MyOwn|
|000003f0| 65 72 29 3b 0d 0a 0d 0a | 09 69 66 20 28 42 61 63 |er);....|.if (Bac|
|00000400| 6b 67 72 6f 75 6e 64 53 | 74 79 6c 65 4e 61 6d 65 |kgroundS|tyleName|
|00000410| 20 21 3d 20 22 22 29 0d | 0a 09 09 42 61 63 6b 67 | != "").|...Backg|
|00000420| 72 6f 75 6e 64 53 74 79 | 6c 65 20 3d 20 43 6f 6e |roundSty|le = Con|
|00000430| 74 72 6f 6c 6c 65 72 2e | 47 65 74 53 74 79 6c 65 |troller.|GetStyle|
|00000440| 28 42 61 63 6b 67 72 6f | 75 6e 64 53 74 79 6c 65 |(Backgro|undStyle|
|00000450| 4e 61 6d 65 29 3b 0d 0a | 0d 0a 09 4f 6e 4b 65 79 |Name);..|...OnKey|
|00000460| 45 76 65 6e 74 20 3d 20 | 49 6e 74 65 72 6e 61 6c |Event = |Internal|
|00000470| 4f 6e 4b 65 79 45 76 65 | 6e 74 3b 0d 0a 20 20 20 |OnKeyEve|nt;.. |
|00000480| 20 4f 6e 58 43 6f 6e 74 | 72 6f 6c 6c 65 72 45 76 | OnXCont|rollerEv|
|00000490| 65 6e 74 20 3d 20 49 6e | 74 65 72 6e 61 6c 4f 6e |ent = In|ternalOn|
|000004a0| 58 43 6f 6e 74 72 6f 6c | 6c 65 72 45 76 65 6e 74 |XControl|lerEvent|
|000004b0| 3b 0d 0a 0d 0a 7d 0d 0a | 0d 0a 66 75 6e 63 74 69 |;....}..|..functi|
|000004c0| 6f 6e 20 62 6f 6f 6c 20 | 49 6e 74 65 72 6e 61 6c |on bool |Internal|
|000004d0| 4f 6e 4b 65 79 45 76 65 | 6e 74 28 6f 75 74 20 62 |OnKeyEve|nt(out b|
|000004e0| 79 74 65 20 4b 65 79 2c | 20 6f 75 74 20 62 79 74 |yte Key,| out byt|
|000004f0| 65 20 53 74 61 74 65 2c | 20 66 6c 6f 61 74 20 64 |e State,| float d|
|00000500| 65 6c 74 61 29 0d 0a 7b | 0d 0a 09 6c 6f 63 61 6c |elta)..{|...local|
|00000510| 20 69 6e 74 20 69 2c 61 | 54 61 62 49 6e 64 65 78 | int i,a|TabIndex|
|00000520| 2c 20 53 74 61 72 74 49 | 6e 64 65 78 3b 0d 0a 0d |, StartI|ndex;...|
|00000530| 0a 09 69 66 20 28 20 28 | 46 6f 63 75 73 65 64 43 |..if ( (|FocusedC|
|00000540| 6f 6e 74 72 6f 6c 21 3d | 4e 6f 6e 65 29 20 7c 7c |ontrol!=|None) |||
|00000550| 20 28 53 74 61 74 65 21 | 3d 33 29 20 7c 7c 20 28 | (State!|=3) || (|
|00000560| 54 61 62 53 74 61 63 6b | 2e 4c 65 6e 67 74 68 3c |TabStack|.Length<|
|00000570| 3d 30 29 20 29 0d 0a 09 | 09 72 65 74 75 72 6e 20 |=0) )...|.return |
|00000580| 66 61 6c 73 65 3b 0d 0a | 0d 0a 09 69 66 20 28 41 |false;..|...if (A|
|00000590| 63 74 69 76 65 54 61 62 | 20 3d 3d 20 4e 6f 6e 65 |ctiveTab| == None|
|000005a0| 29 0d 0a 09 09 72 65 74 | 75 72 6e 20 66 61 6c 73 |)....ret|urn fals|
|000005b0| 65 3b 0d 0a 0d 0a 20 20 | 20 20 66 6f 72 28 69 3d |e;.... | for(i=|
|000005c0| 30 3b 69 3c 54 61 62 53 | 74 61 63 6b 2e 4c 65 6e |0;i<TabS|tack.Len|
|000005d0| 67 74 68 3b 69 2b 2b 29 | 0d 0a 20 20 20 20 7b 0d |gth;i++)|.. {.|
|000005e0| 0a 20 20 20 20 20 20 20 | 20 69 66 20 28 54 61 62 |. | if (Tab|
|000005f0| 53 74 61 63 6b 5b 69 5d | 3d 3d 41 63 74 69 76 65 |Stack[i]|==Active|
|00000600| 54 61 62 29 0d 0a 20 20 | 20 20 20 20 20 20 7b 0d |Tab).. | {.|
|00000610| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 61 54 61 |. | aTa|
|00000620| 62 49 6e 64 65 78 20 3d | 20 69 3b 0d 0a 20 20 20 |bIndex =| i;.. |
|00000630| 20 20 20 20 20 20 20 20 | 20 62 72 65 61 6b 3b 0d | | break;.|
|00000640| 0a 20 20 20 20 20 20 20 | 20 7d 0d 0a 20 20 20 20 |. | }.. |
|00000650| 7d 0d 0a 0d 0a 09 69 66 | 20 28 20 28 4b 65 79 3d |}.....if| ( (Key=|
|00000660| 3d 30 78 32 35 29 20 7c | 7c 20 28 4b 65 79 3d 3d |=0x25) ||| (Key==|
|00000670| 30 78 36 34 29 20 29 09 | 2f 2f 20 4c 65 66 74 0d |0x64) ).|// Left.|
|00000680| 0a 09 7b 0d 0a 09 09 53 | 74 61 72 74 49 6e 64 65 |..{....S|tartInde|
|00000690| 78 20 3d 20 61 54 61 62 | 49 6e 64 65 78 3b 0d 0a |x = aTab|Index;..|
|000006a0| 09 09 77 68 69 6c 65 20 | 28 74 72 75 65 29 0d 0a |..while |(true)..|
|000006b0| 09 09 7b 0d 0a 09 09 09 | 69 66 20 28 61 54 61 62 |..{.....|if (aTab|
|000006c0| 49 6e 64 65 78 3d 3d 30 | 29 0d 0a 09 09 09 09 61 |Index==0|)......a|
|000006d0| 54 61 62 49 6e 64 65 78 | 3d 54 61 62 53 74 61 63 |TabIndex|=TabStac|
|000006e0| 6b 2e 4c 65 6e 67 74 68 | 2d 31 3b 0d 0a 09 09 09 |k.Length|-1;.....|
|000006f0| 65 6c 73 65 0d 0a 09 09 | 09 09 61 54 61 62 49 6e |else....|..aTabIn|
|00000700| 64 65 78 2d 2d 3b 0d 0a | 0d 0a 09 09 09 69 66 20 |dex--;..|.....if |
|00000710| 28 61 54 61 62 49 6e 64 | 65 78 20 3d 3d 20 53 74 |(aTabInd|ex == St|
|00000720| 61 72 74 49 6e 64 65 78 | 20 7c 7c 20 41 63 74 69 |artIndex| || Acti|
|00000730| 76 61 74 65 54 61 62 28 | 54 61 62 53 74 61 63 6b |vateTab(|TabStack|
|00000740| 5b 61 54 61 62 49 6e 64 | 65 78 5d 2c 74 72 75 65 |[aTabInd|ex],true|
|00000750| 29 29 0d 0a 09 09 09 09 | 62 72 65 61 6b 3b 0d 0a |))......|break;..|
|00000760| 09 09 7d 0d 0a 09 09 72 | 65 74 75 72 6e 20 74 72 |..}....r|eturn tr|
|00000770| 75 65 3b 0d 0a 0d 0a 09 | 7d 0d 0a 0d 0a 09 69 66 |ue;.....|}.....if|
|00000780| 20 28 20 28 4b 65 79 3d | 3d 30 78 32 37 29 20 7c | ( (Key=|=0x27) ||
|00000790| 7c 20 28 4b 65 79 3d 3d | 30 78 36 36 29 20 29 09 || (Key==|0x66) ).|
|000007a0| 2f 2f 20 52 69 67 68 74 | 0d 0a 09 7b 0d 0a 09 09 |// Right|...{....|
|000007b0| 53 74 61 72 74 49 6e 64 | 65 78 20 3d 20 61 54 61 |StartInd|ex = aTa|
|000007c0| 62 49 6e 64 65 78 3b 0d | 0a 09 09 77 68 69 6c 65 |bIndex;.|...while|
|000007d0| 20 28 74 72 75 65 29 0d | 0a 09 09 7b 0d 0a 09 09 | (true).|...{....|
|000007e0| 09 61 54 61 62 49 6e 64 | 65 78 2b 2b 3b 0d 0a 09 |.aTabInd|ex++;...|
|000007f0| 09 09 69 66 20 28 61 54 | 61 62 49 6e 64 65 78 3d |..if (aT|abIndex=|
|00000800| 3d 54 61 62 53 74 61 63 | 6b 2e 4c 65 6e 67 74 68 |=TabStac|k.Length|
|00000810| 29 0d 0a 09 09 09 09 61 | 54 61 62 49 6e 64 65 78 |)......a|TabIndex|
|00000820| 3d 30 3b 0d 0a 0d 0a 09 | 09 09 69 66 20 28 53 74 |=0;.....|..if (St|
|00000830| 61 72 74 49 6e 64 65 78 | 20 3d 3d 20 61 54 61 62 |artIndex| == aTab|
|00000840| 49 6e 64 65 78 20 7c 7c | 20 41 63 74 69 76 61 74 |Index ||| Activat|
|00000850| 65 54 61 62 28 54 61 62 | 53 74 61 63 6b 5b 61 54 |eTab(Tab|Stack[aT|
|00000860| 61 62 49 6e 64 65 78 5d | 2c 74 72 75 65 29 29 0d |abIndex]|,true)).|
|00000870| 0a 09 09 09 09 62 72 65 | 61 6b 3b 0d 0a 09 09 7d |.....bre|ak;....}|
|00000880| 0d 0a 09 09 72 65 74 75 | 72 6e 20 74 72 75 65 3b |....retu|rn true;|
|00000890| 0d 0a 09 7d 0d 0a 0d 0a | 09 72 65 74 75 72 6e 20 |...}....|.return |
|000008a0| 66 61 6c 73 65 3b 0d 0a | 7d 0d 0a 0d 0a 66 75 6e |false;..|}....fun|
|000008b0| 63 74 69 6f 6e 20 62 6f | 6f 6c 20 49 6e 74 65 72 |ction bo|ol Inter|
|000008c0| 6e 61 6c 4f 6e 58 43 6f | 6e 74 72 6f 6c 6c 65 72 |nalOnXCo|ntroller|
|000008d0| 45 76 65 6e 74 28 62 79 | 74 65 20 49 64 2c 20 65 |Event(by|te Id, e|
|000008e0| 58 43 6f 6e 74 72 6f 6c | 6c 65 72 43 6f 64 65 73 |XControl|lerCodes|
|000008f0| 20 69 43 6f 64 65 29 0d | 0a 7b 0d 0a 0d 0a 20 09 | iCode).|.{.... .|
|00000900| 69 66 20 28 69 43 6f 64 | 65 20 3d 3d 20 58 43 5f |if (iCod|e == XC_|
|00000910| 4c 65 66 74 54 72 69 67 | 67 65 72 29 0d 0a 20 20 |LeftTrig|ger).. |
|00000920| 20 20 7b 0d 0a 20 20 20 | 20 09 4e 65 78 74 50 61 | {.. | .NextPa|
|00000930| 67 65 28 29 3b 0d 0a 20 | 20 20 20 20 20 20 20 72 |ge();.. | r|
|00000940| 65 74 75 72 6e 20 74 72 | 75 65 3b 0d 0a 20 20 20 |eturn tr|ue;.. |
|00000950| 20 7d 0d 0a 0d 0a 20 20 | 20 20 65 6c 73 65 20 69 | }.... | else i|
|00000960| 66 20 28 69 43 6f 64 65 | 20 3d 3d 20 58 43 5f 52 |f (iCode| == XC_R|
|00000970| 69 67 68 74 54 72 69 67 | 67 65 72 29 0d 0a 20 20 |ightTrig|ger).. |
|00000980| 20 20 7b 0d 0a 09 09 50 | 72 65 76 50 61 67 65 28 | {....P|revPage(|
|00000990| 29 3b 0d 0a 20 20 20 20 | 20 20 20 20 72 65 74 75 |);.. | retu|
|000009a0| 72 6e 20 74 72 75 65 3b | 0d 0a 20 20 20 20 7d 0d |rn true;|.. }.|
|000009b0| 0a 0d 0a 20 20 20 20 72 | 65 74 75 72 6e 20 66 61 |... r|eturn fa|
|000009c0| 6c 73 65 3b 0d 0a 0d 0a | 7d 0d 0a 0d 0a 0d 0a 66 |lse;....|}......f|
|000009d0| 75 6e 63 74 69 6f 6e 20 | 47 55 49 54 61 62 50 61 |unction |GUITabPa|
|000009e0| 6e 65 6c 20 41 64 64 54 | 61 62 28 73 74 72 69 6e |nel AddT|ab(strin|
|000009f0| 67 20 43 61 70 74 69 6f | 6e 2c 20 73 74 72 69 6e |g Captio|n, strin|
|00000a00| 67 20 50 61 6e 65 6c 43 | 6c 61 73 73 2c 20 6f 70 |g PanelC|lass, op|
|00000a10| 74 69 6f 6e 61 6c 20 47 | 55 49 54 61 62 50 61 6e |tional G|UITabPan|
|00000a20| 65 6c 20 45 78 69 73 74 | 69 6e 67 50 61 6e 65 6c |el Exist|ingPanel|
|00000a30| 2c 20 6f 70 74 69 6f 6e | 61 6c 20 73 74 72 69 6e |, option|al strin|
|00000a40| 67 20 48 69 6e 74 2c 20 | 6f 70 74 69 6f 6e 61 6c |g Hint, |optional|
|00000a50| 20 62 6f 6f 6c 20 62 46 | 6f 72 63 65 41 63 74 69 | bool bF|orceActi|
|00000a60| 76 65 29 0d 0a 7b 0d 0a | 09 6c 6f 63 61 6c 20 63 |ve)..{..|.local c|
|00000a70| 6c 61 73 73 3c 47 55 49 | 54 61 62 50 61 6e 65 6c |lass<GUI|TabPanel|
|00000a80| 3e 20 4e 65 77 50 61 6e | 65 6c 43 6c 61 73 73 3b |> NewPan|elClass;|
|00000a90| 0d 0a 0d 0a 09 6c 6f 63 | 61 6c 20 47 55 49 54 61 |.....loc|al GUITa|
|00000aa0| 62 42 75 74 74 6f 6e 20 | 4e 65 77 54 61 62 42 75 |bButton |NewTabBu|
|00000ab0| 74 74 6f 6e 3b 0d 0a 09 | 6c 6f 63 61 6c 20 47 55 |tton;...|local GU|
|00000ac0| 49 54 61 62 50 61 6e 65 | 6c 20 20 4e 65 77 54 61 |ITabPane|l NewTa|
|00000ad0| 62 50 61 6e 65 6c 3b 0d | 0a 0d 0a 09 6c 6f 63 61 |bPanel;.|....loca|
|00000ae0| 6c 20 69 6e 74 20 69 3b | 0d 0a 0d 0a 09 2f 2f 20 |l int i;|.....// |
|00000af0| 4d 61 6b 65 20 73 75 72 | 65 20 74 68 69 73 20 64 |Make sur|e this d|
|00000b00| 6f 65 73 6e 27 74 20 65 | 78 69 73 74 20 66 69 72 |oesn't e|xist fir|
|00000b10| 73 74 0d 0a 09 66 6f 72 | 20 28 69 3d 30 3b 69 3c |st...for| (i=0;i<|
|00000b20| 54 61 62 53 74 61 63 6b | 2e 4c 65 6e 67 74 68 3b |TabStack|.Length;|
|00000b30| 69 2b 2b 29 0d 0a 09 7b | 0d 0a 09 09 69 66 20 28 |i++)...{|....if (|
|00000b40| 54 61 62 53 74 61 63 6b | 5b 69 5d 2e 43 61 70 74 |TabStack|[i].Capt|
|00000b50| 69 6f 6e 20 7e 3d 20 43 | 61 70 74 69 6f 6e 29 0d |ion ~= C|aption).|
|00000b60| 0a 09 09 7b 0d 0a 09 09 | 09 6c 6f 67 28 22 41 20 |...{....|.log("A |
|00000b70| 54 61 62 20 77 69 74 68 | 20 74 68 65 20 63 61 70 |Tab with| the cap|
|00000b80| 74 69 6f 6e 22 40 43 61 | 70 74 69 6f 6e 40 22 61 |tion"@Ca|ption@"a|
|00000b90| 6c 72 65 61 64 79 20 65 | 78 69 73 74 73 2e 22 29 |lready e|xists.")|
|00000ba0| 3b 0d 0a 09 09 09 72 65 | 74 75 72 6e 20 6e 6f 6e |;.....re|turn non|
|00000bb0| 65 3b 0d 0a 09 09 7d 0d | 0a 09 7d 0d 0a 0d 0a 09 |e;....}.|..}.....|
|00000bc0| 69 66 20 28 45 78 69 73 | 74 69 6e 67 50 61 6e 65 |if (Exis|tingPane|
|00000bd0| 6c 3d 3d 4e 6f 6e 65 29 | 0d 0a 09 09 4e 65 77 50 |l==None)|....NewP|
|00000be0| 61 6e 65 6c 43 6c 61 73 | 73 20 3d 20 63 6c 61 73 |anelClas|s = clas|
|00000bf0| 73 3c 47 55 49 54 61 62 | 50 61 6e 65 6c 3e 28 44 |s<GUITab|Panel>(D|
|00000c00| 79 6e 61 6d 69 63 4c 6f | 61 64 4f 62 6a 65 63 74 |ynamicLo|adObject|
|00000c10| 28 50 61 6e 65 6c 43 6c | 61 73 73 2c 63 6c 61 73 |(PanelCl|ass,clas|
|00000c20| 73 27 63 6c 61 73 73 27 | 29 29 3b 0d 0a 0d 0a 09 |s'class'|));.....|
|00000c30| 69 66 20 28 20 28 45 78 | 69 73 74 69 6e 67 50 61 |if ( (Ex|istingPa|
|00000c40| 6e 65 6c 21 3d 4e 6f 6e | 65 29 20 7c 7c 20 28 4e |nel!=Non|e) || (N|
|00000c50| 65 77 50 61 6e 65 6c 43 | 6c 61 73 73 20 21 3d 20 |ewPanelC|lass != |
|00000c60| 4e 6f 6e 65 29 20 29 0d | 0a 09 7b 0d 0a 09 09 69 |None) ).|..{....i|
|00000c70| 66 20 28 45 78 69 73 74 | 69 6e 67 50 61 6e 65 6c |f (Exist|ingPanel|
|00000c80| 20 21 3d 20 4e 6f 6e 65 | 29 0d 0a 09 20 20 20 20 | != None|)... |
|00000c90| 20 20 20 20 4e 65 77 54 | 61 62 50 61 6e 65 6c 20 | NewT|abPanel |
|00000ca0| 3d 20 47 55 49 54 61 62 | 50 61 6e 65 6c 28 41 70 |= GUITab|Panel(Ap|
|00000cb0| 70 65 6e 64 43 6f 6d 70 | 6f 6e 65 6e 74 28 45 78 |pendComp|onent(Ex|
|00000cc0| 69 73 74 69 6e 67 50 61 | 6e 65 6c 29 29 3b 0d 0a |istingPa|nel));..|
|00000cd0| 09 20 20 20 20 65 6c 73 | 65 20 69 66 20 28 4e 65 |. els|e if (Ne|
|00000ce0| 77 50 61 6e 65 6c 43 6c | 61 73 73 20 21 3d 20 4e |wPanelCl|ass != N|
|00000cf0| 6f 6e 65 29 0d 0a 09 09 | 09 4e 65 77 54 61 62 50 |one)....|.NewTabP|
|00000d00| 61 6e 65 6c 20 3d 20 47 | 55 49 54 61 62 50 61 6e |anel = G|UITabPan|
|00000d10| 65 6c 28 41 64 64 43 6f | 6d 70 6f 6e 65 6e 74 28 |el(AddCo|mponent(|
|00000d20| 50 61 6e 65 6c 43 6c 61 | 73 73 29 29 3b 0d 0a 0d |PanelCla|ss));...|
|00000d30| 0a 09 09 69 66 20 28 4e | 65 77 54 61 62 50 61 6e |...if (N|ewTabPan|
|00000d40| 65 6c 20 3d 3d 20 4e 6f | 6e 65 29 0d 0a 09 09 7b |el == No|ne)....{|
|00000d50| 0d 0a 09 09 09 6c 6f 67 | 28 22 43 6f 75 6c 64 20 |.....log|("Could |
|00000d60| 6e 6f 74 20 63 72 65 61 | 74 65 20 70 61 6e 65 6c |not crea|te panel|
|00000d70| 20 66 6f 72 22 40 4e 65 | 77 50 61 6e 65 6c 43 6c | for"@Ne|wPanelCl|
|00000d80| 61 73 73 29 3b 0d 0a 09 | 09 09 72 65 74 75 72 6e |ass);...|..return|
|00000d90| 20 4e 6f 6e 65 3b 0d 0a | 09 09 7d 0d 0a 0d 0a 09 | None;..|..}.....|
|00000da0| 09 69 66 20 28 4e 65 77 | 54 61 62 50 61 6e 65 6c |.if (New|TabPanel|
|00000db0| 2e 4d 79 42 75 74 74 6f | 6e 20 21 3d 20 4e 6f 6e |.MyButto|n != Non|
|00000dc0| 65 29 0d 0a 09 09 09 4e | 65 77 54 61 62 42 75 74 |e).....N|ewTabBut|
|00000dd0| 74 6f 6e 20 3d 20 4e 65 | 77 54 61 62 50 61 6e 65 |ton = Ne|wTabPane|
|00000de0| 6c 2e 4d 79 42 75 74 74 | 6f 6e 3b 0d 0a 09 09 65 |l.MyButt|on;....e|
|00000df0| 6c 73 65 0d 0a 09 09 7b | 0d 0a 09 09 09 4e 65 77 |lse....{|.....New|
|00000e00| 54 61 62 42 75 74 74 6f | 6e 20 3d 20 6e 65 77 20 |TabButto|n = new |
|00000e10| 63 6c 61 73 73 27 47 55 | 49 54 61 62 42 75 74 74 |class'GU|ITabButt|
|00000e20| 6f 6e 27 3b 0d 0a 09 09 | 09 69 66 20 28 4e 65 77 |on';....|.if (New|
|00000e30| 54 61 62 42 75 74 74 6f | 6e 3d 3d 4e 6f 6e 65 29 |TabButto|n==None)|
|00000e40| 0d 0a 09 09 09 7b 0d 0a | 09 09 09 09 6c 6f 67 28 |.....{..|....log(|
|00000e50| 22 43 6f 75 6c 64 20 6e | 6f 74 20 63 72 65 61 74 |"Could n|ot creat|
|00000e60| 65 20 74 61 62 20 66 6f | 72 22 40 4e 65 77 50 61 |e tab fo|r"@NewPa|
|00000e70| 6e 65 6c 43 6c 61 73 73 | 29 3b 0d 0a 09 09 09 09 |nelClass|);......|
|00000e80| 72 65 74 75 72 6e 20 4e | 6f 6e 65 3b 0d 0a 09 09 |return N|one;....|
|00000e90| 09 7d 0d 0a 0d 0a 09 09 | 09 4e 65 77 54 61 62 42 |.}......|.NewTabB|
|00000ea0| 75 74 74 6f 6e 2e 49 6e | 69 74 43 6f 6d 70 6f 6e |utton.In|itCompon|
|00000eb0| 65 6e 74 28 43 6f 6e 74 | 72 6f 6c 6c 65 72 2c 20 |ent(Cont|roller, |
|00000ec0| 53 65 6c 66 29 3b 0d 0a | 09 09 09 4e 65 77 54 61 |Self);..|...NewTa|
|00000ed0| 62 50 61 6e 65 6c 2e 4d | 79 42 75 74 74 6f 6e 20 |bPanel.M|yButton |
|00000ee0| 3d 20 4e 65 77 54 61 62 | 42 75 74 74 6f 6e 3b 0d |= NewTab|Button;.|
|00000ef0| 0a 09 09 7d 0d 0a 0d 0a | 09 09 4e 65 77 54 61 62 |...}....|..NewTab|
|00000f00| 50 61 6e 65 6c 2e 4d 79 | 42 75 74 74 6f 6e 20 2e |Panel.My|Button .|
|00000f10| 48 69 6e 74 09 09 09 3d | 20 48 69 6e 74 3b 0d 0a |Hint...=| Hint;..|
|00000f20| 09 09 4e 65 77 54 61 62 | 50 61 6e 65 6c 2e 4d 79 |..NewTab|Panel.My|
|00000f30| 42 75 74 74 6f 6e 20 2e | 43 61 70 74 69 6f 6e 09 |Button .|Caption.|
|00000f40| 09 3d 20 43 61 70 74 69 | 6f 6e 3b 0d 0a 09 09 4e |.= Capti|on;....N|
|00000f50| 65 77 54 61 62 50 61 6e | 65 6c 2e 4d 79 42 75 74 |ewTabPan|el.MyBut|
|00000f60| 74 6f 6e 20 2e 4f 6e 43 | 6c 69 63 6b 09 09 3d 20 |ton .OnC|lick..= |
|00000f70| 49 6e 74 65 72 6e 61 6c | 54 61 62 43 6c 69 63 6b |Internal|TabClick|
|00000f80| 3b 0d 0a 09 09 4e 65 77 | 54 61 62 50 61 6e 65 6c |;....New|TabPanel|
|00000f90| 2e 4d 79 42 75 74 74 6f | 6e 20 2e 4d 79 50 61 6e |.MyButto|n .MyPan|
|00000fa0| 65 6c 09 09 3d 20 4e 65 | 77 54 61 62 50 61 6e 65 |el..= Ne|wTabPane|
|00000fb0| 6c 3b 0d 0a 09 09 4e 65 | 77 54 61 62 50 61 6e 65 |l;....Ne|wTabPane|
|00000fc0| 6c 2e 4d 79 42 75 74 74 | 6f 6e 20 2e 46 6f 63 75 |l.MyButt|on .Focu|
|00000fd0| 73 49 6e 73 74 65 61 64 | 09 3d 20 73 65 6c 66 3b |sInstead|.= self;|
|00000fe0| 0d 0a 09 09 4e 65 77 54 | 61 62 50 61 6e 65 6c 2e |....NewT|abPanel.|
|00000ff0| 4d 79 42 75 74 74 6f 6e | 20 2e 62 4e 65 76 65 72 |MyButton| .bNever|
|00001000| 46 6f 63 75 73 09 3d 20 | 74 72 75 65 3b 0d 0a 0d |Focus.= |true;...|
|00001010| 0a 09 09 4e 65 77 54 61 | 62 50 61 6e 65 6c 2e 49 |...NewTa|bPanel.I|
|00001020| 6e 69 74 50 61 6e 65 6c | 28 29 3b 0d 0a 09 09 4e |nitPanel|();....N|
|00001030| 65 77 54 61 62 50 61 6e | 65 6c 2e 48 69 64 65 28 |ewTabPan|el.Hide(|
|00001040| 29 3b 0d 0a 0d 0a 09 09 | 2f 2f 20 41 64 64 20 74 |);......|// Add t|
|00001050| 68 65 20 74 61 62 20 74 | 6f 20 63 6f 6e 74 72 6f |he tab t|o contro|
|00001060| 6c 73 0d 0a 09 09 54 61 | 62 53 74 61 63 6b 5b 54 |ls....Ta|bStack[T|
|00001070| 61 62 53 74 61 63 6b 2e | 4c 65 6e 67 74 68 5d 20 |abStack.|Length] |
|00001080| 3d 20 4e 65 77 54 61 62 | 50 61 6e 65 6c 2e 4d 79 |= NewTab|Panel.My|
|00001090| 42 75 74 74 6f 6e 3b 0d | 0a 09 09 69 66 20 28 20 |Button;.|...if ( |
|000010a0| 28 54 61 62 53 74 61 63 | 6b 2e 4c 65 6e 67 74 68 |(TabStac|k.Length|
|000010b0| 3d 3d 31 29 20 7c 7c 20 | 28 62 46 6f 72 63 65 41 |==1) || |(bForceA|
|000010c0| 63 74 69 76 65 29 20 29 | 0d 0a 20 20 20 20 20 20 |ctive) )|.. |
|000010d0| 20 20 7b 0d 0a 09 09 09 | 41 63 74 69 76 61 74 65 | {.....|Activate|
|000010e0| 54 61 62 28 4e 65 77 54 | 61 62 50 61 6e 65 6c 2e |Tab(NewT|abPanel.|
|000010f0| 4d 79 42 75 74 74 6f 6e | 2c 74 72 75 65 29 3b 0d |MyButton|,true);.|
|00001100| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 4e 65 77 |. | New|
|00001110| 54 61 62 50 61 6e 65 6c | 2e 46 6f 63 75 73 46 69 |TabPanel|.FocusFi|
|00001120| 72 73 74 28 6e 6f 6e 65 | 29 3b 0d 0a 20 20 20 20 |rst(none|);.. |
|00001130| 20 20 20 20 7d 0d 0a 0d | 0a 09 09 52 65 74 75 72 | }...|...Retur|
|00001140| 6e 20 4e 65 77 54 61 62 | 50 61 6e 65 6c 3b 0d 0a |n NewTab|Panel;..|
|00001150| 0d 0a 09 7d 0d 0a 09 65 | 6c 73 65 0d 0a 09 09 72 |...}...e|lse....r|
|00001160| 65 74 75 72 6e 20 6e 6f | 6e 65 3b 0d 0a 7d 0d 0a |eturn no|ne;..}..|
|00001170| 0d 0a 66 75 6e 63 74 69 | 6f 6e 20 47 55 49 54 61 |..functi|on GUITa|
|00001180| 62 50 61 6e 65 6c 20 49 | 6e 73 65 72 74 54 61 62 |bPanel I|nsertTab|
|00001190| 28 69 6e 74 20 50 6f 73 | 2c 20 73 74 72 69 6e 67 |(int Pos|, string|
|000011a0| 20 43 61 70 74 69 6f 6e | 2c 20 73 74 72 69 6e 67 | Caption|, string|
|000011b0| 20 50 61 6e 65 6c 43 6c | 61 73 73 2c 20 6f 70 74 | PanelCl|ass, opt|
|000011c0| 69 6f 6e 61 6c 20 47 55 | 49 54 61 62 50 61 6e 65 |ional GU|ITabPane|
|000011d0| 6c 20 45 78 69 73 74 69 | 6e 67 50 61 6e 65 6c 2c |l Existi|ngPanel,|
|000011e0| 20 6f 70 74 69 6f 6e 61 | 6c 20 73 74 72 69 6e 67 | optiona|l string|
|000011f0| 20 48 69 6e 74 2c 20 6f | 70 74 69 6f 6e 61 6c 20 | Hint, o|ptional |
|00001200| 62 6f 6f 6c 20 62 46 6f | 72 63 65 41 63 74 69 76 |bool bFo|rceActiv|
|00001210| 65 29 0d 0a 7b 0d 0a 09 | 6c 6f 63 61 6c 20 63 6c |e)..{...|local cl|
|00001220| 61 73 73 3c 47 55 49 54 | 61 62 50 61 6e 65 6c 3e |ass<GUIT|abPanel>|
|00001230| 20 4e 65 77 50 61 6e 65 | 6c 43 6c 61 73 73 3b 0d | NewPane|lClass;.|
|00001240| 0a 09 6c 6f 63 61 6c 20 | 47 55 49 54 61 62 50 61 |..local |GUITabPa|
|00001250| 6e 65 6c 20 4e 65 77 54 | 61 62 50 61 6e 65 6c 3b |nel NewT|abPanel;|
|00001260| 0d 0a 09 6c 6f 63 61 6c | 20 47 55 49 54 61 62 42 |...local| GUITabB|
|00001270| 75 74 74 6f 6e 20 4e 65 | 77 54 61 62 42 75 74 74 |utton Ne|wTabButt|
|00001280| 6f 6e 3b 0d 0a 0d 0a 09 | 69 66 20 28 45 78 69 73 |on;.....|if (Exis|
|00001290| 74 69 6e 67 50 61 6e 65 | 6c 20 3d 3d 20 4e 6f 6e |tingPane|l == Non|
|000012a0| 65 29 0d 0a 09 09 4e 65 | 77 50 61 6e 65 6c 43 6c |e)....Ne|wPanelCl|
|000012b0| 61 73 73 20 3d 20 63 6c | 61 73 73 3c 47 55 49 54 |ass = cl|ass<GUIT|
|000012c0| 61 62 50 61 6e 65 6c 3e | 28 44 79 6e 61 6d 69 63 |abPanel>|(Dynamic|
|000012d0| 4c 6f 61 64 4f 62 6a 65 | 63 74 28 50 61 6e 65 6c |LoadObje|ct(Panel|
|000012e0| 43 6c 61 73 73 2c 63 6c | 61 73 73 27 43 6c 61 73 |Class,cl|ass'Clas|
|000012f0| 73 27 29 29 3b 0d 0a 0d | 0a 09 69 66 20 28 20 45 |s'));...|..if ( E|
|00001300| 78 69 73 74 69 6e 67 50 | 61 6e 65 6c 20 21 3d 20 |xistingP|anel != |
|00001310| 4e 6f 6e 65 20 7c 7c 20 | 4e 65 77 50 61 6e 65 6c |None || |NewPanel|
|00001320| 43 6c 61 73 73 20 21 3d | 20 4e 6f 6e 65 29 0d 0a |Class !=| None)..|
|00001330| 09 7b 0d 0a 09 09 69 66 | 20 28 45 78 69 73 74 69 |.{....if| (Existi|
|00001340| 6e 67 50 61 6e 65 6c 20 | 21 3d 20 4e 6f 6e 65 29 |ngPanel |!= None)|
|00001350| 0d 0a 09 20 20 20 20 20 | 20 20 20 4e 65 77 54 61 |... | NewTa|
|00001360| 62 50 61 6e 65 6c 20 3d | 20 47 55 49 54 61 62 50 |bPanel =| GUITabP|
|00001370| 61 6e 65 6c 28 41 70 70 | 65 6e 64 43 6f 6d 70 6f |anel(App|endCompo|
|00001380| 6e 65 6e 74 28 45 78 69 | 73 74 69 6e 67 50 61 6e |nent(Exi|stingPan|
|00001390| 65 6c 29 29 3b 0d 0a 09 | 20 20 20 20 65 6c 73 65 |el));...| else|
|000013a0| 20 69 66 20 28 4e 65 77 | 50 61 6e 65 6c 43 6c 61 | if (New|PanelCla|
|000013b0| 73 73 20 21 3d 20 4e 6f | 6e 65 29 0d 0a 09 09 09 |ss != No|ne).....|
|000013c0| 4e 65 77 54 61 62 50 61 | 6e 65 6c 20 3d 20 47 55 |NewTabPa|nel = GU|
|000013d0| 49 54 61 62 50 61 6e 65 | 6c 28 41 64 64 43 6f 6d |ITabPane|l(AddCom|
|000013e0| 70 6f 6e 65 6e 74 28 50 | 61 6e 65 6c 43 6c 61 73 |ponent(P|anelClas|
|000013f0| 73 29 29 3b 0d 0a 0d 0a | 09 09 69 66 20 28 4e 65 |s));....|..if (Ne|
|00001400| 77 54 61 62 50 61 6e 65 | 6c 20 3d 3d 20 4e 6f 6e |wTabPane|l == Non|
|00001410| 65 29 0d 0a 09 09 7b 0d | 0a 09 09 09 6c 6f 67 28 |e)....{.|....log(|
|00001420| 22 43 6f 75 6c 64 20 6e | 6f 74 20 63 72 65 61 74 |"Could n|ot creat|
|00001430| 65 20 70 61 6e 65 6c 20 | 66 6f 72 22 40 4e 65 77 |e panel |for"@New|
|00001440| 50 61 6e 65 6c 43 6c 61 | 73 73 29 3b 0d 0a 09 09 |PanelCla|ss);....|
|00001450| 09 72 65 74 75 72 6e 20 | 4e 6f 6e 65 3b 0d 0a 09 |.return |None;...|
|00001460| 09 7d 0d 0a 0d 0a 09 09 | 69 66 20 28 4e 65 77 54 |.}......|if (NewT|
|00001470| 61 62 50 61 6e 65 6c 2e | 4d 79 42 75 74 74 6f 6e |abPanel.|MyButton|
|00001480| 20 21 3d 20 4e 6f 6e 65 | 29 0d 0a 09 09 09 4e 65 | != None|).....Ne|
|00001490| 77 54 61 62 42 75 74 74 | 6f 6e 20 3d 20 4e 65 77 |wTabButt|on = New|
|000014a0| 54 61 62 50 61 6e 65 6c | 2e 4d 79 42 75 74 74 6f |TabPanel|.MyButto|
|000014b0| 6e 3b 0d 0a 0d 0a 09 09 | 65 6c 73 65 0d 0a 09 09 |n;......|else....|
|000014c0| 7b 0d 0a 09 09 09 4e 65 | 77 54 61 62 42 75 74 74 |{.....Ne|wTabButt|
|000014d0| 6f 6e 20 3d 20 6e 65 77 | 20 63 6c 61 73 73 27 47 |on = new| class'G|
|000014e0| 55 49 54 61 62 42 75 74 | 74 6f 6e 27 3b 0d 0a 09 |UITabBut|ton';...|
|000014f0| 09 09 69 66 20 28 4e 65 | 77 54 61 62 42 75 74 74 |..if (Ne|wTabButt|
|00001500| 6f 6e 3d 3d 4e 6f 6e 65 | 29 0d 0a 09 09 09 7b 0d |on==None|).....{.|
|00001510| 0a 09 09 09 09 6c 6f 67 | 28 22 43 6f 75 6c 64 20 |.....log|("Could |
|00001520| 6e 6f 74 20 63 72 65 61 | 74 65 20 74 61 62 20 66 |not crea|te tab f|
|00001530| 6f 72 22 40 4e 65 77 50 | 61 6e 65 6c 43 6c 61 73 |or"@NewP|anelClas|
|00001540| 73 29 3b 0d 0a 09 09 09 | 09 72 65 74 75 72 6e 20 |s);.....|.return |
|00001550| 4e 6f 6e 65 3b 0d 0a 09 | 09 09 7d 0d 0a 0d 0a 09 |None;...|..}.....|
|00001560| 09 09 4e 65 77 54 61 62 | 42 75 74 74 6f 6e 2e 49 |..NewTab|Button.I|
|00001570| 6e 69 74 43 6f 6d 70 6f | 6e 65 6e 74 28 43 6f 6e |nitCompo|nent(Con|
|00001580| 74 72 6f 6c 6c 65 72 2c | 20 53 65 6c 66 29 3b 0d |troller,| Self);.|
|00001590| 0a 09 09 09 4e 65 77 54 | 61 62 50 61 6e 65 6c 2e |....NewT|abPanel.|
|000015a0| 4d 79 42 75 74 74 6f 6e | 20 3d 20 4e 65 77 54 61 |MyButton| = NewTa|
|000015b0| 62 42 75 74 74 6f 6e 3b | 0d 0a 09 09 7d 0d 0a 0d |bButton;|....}...|
|000015c0| 0a 0d 0a 09 09 4e 65 77 | 54 61 62 50 61 6e 65 6c |.....New|TabPanel|
|000015d0| 2e 4d 79 42 75 74 74 6f | 6e 2e 43 61 70 74 69 6f |.MyButto|n.Captio|
|000015e0| 6e 20 3d 20 43 61 70 74 | 69 6f 6e 3b 0d 0a 09 09 |n = Capt|ion;....|
|000015f0| 4e 65 77 54 61 62 50 61 | 6e 65 6c 2e 4d 79 42 75 |NewTabPa|nel.MyBu|
|00001600| 74 74 6f 6e 2e 48 69 6e | 74 20 3d 20 48 69 6e 74 |tton.Hin|t = Hint|
|00001610| 3b 0d 0a 0d 0a 09 09 4e | 65 77 54 61 62 50 61 6e |;......N|ewTabPan|
|00001620| 65 6c 2e 4d 79 42 75 74 | 74 6f 6e 2e 4f 6e 43 6c |el.MyBut|ton.OnCl|
|00001630| 69 63 6b 20 3d 20 49 6e | 74 65 72 6e 61 6c 54 61 |ick = In|ternalTa|
|00001640| 62 43 6c 69 63 6b 3b 0d | 0a 09 09 4e 65 77 54 61 |bClick;.|...NewTa|
|00001650| 62 50 61 6e 65 6c 2e 4d | 79 42 75 74 74 6f 6e 2e |bPanel.M|yButton.|
|00001660| 46 6f 63 75 73 49 6e 73 | 74 65 61 64 20 3d 20 73 |FocusIns|tead = s|
|00001670| 65 6c 66 3b 0d 0a 09 09 | 4e 65 77 54 61 62 50 61 |elf;....|NewTabPa|
|00001680| 6e 65 6c 2e 4d 79 42 75 | 74 74 6f 6e 2e 62 4e 65 |nel.MyBu|tton.bNe|
|00001690| 76 65 72 46 6f 63 75 73 | 20 3d 20 74 72 75 65 3b |verFocus| = true;|
|000016a0| 0d 0a 09 09 4e 65 77 54 | 61 62 50 61 6e 65 6c 2e |....NewT|abPanel.|
|000016b0| 49 6e 69 74 50 61 6e 65 | 6c 28 29 3b 0d 0a 09 09 |InitPane|l();....|
|000016c0| 4e 65 77 54 61 62 50 61 | 6e 65 6c 2e 48 69 64 65 |NewTabPa|nel.Hide|
|000016d0| 28 29 3b 0d 0a 0d 0a 09 | 09 54 61 62 53 74 61 63 |();.....|.TabStac|
|000016e0| 6b 2e 49 6e 73 65 72 74 | 28 50 6f 73 2c 20 31 29 |k.Insert|(Pos, 1)|
|000016f0| 3b 0d 0a 09 09 54 61 62 | 53 74 61 63 6b 5b 50 6f |;....Tab|Stack[Po|
|00001700| 73 5d 20 3d 20 4e 65 77 | 54 61 62 50 61 6e 65 6c |s] = New|TabPanel|
|00001710| 2e 4d 79 42 75 74 74 6f | 6e 3b 0d 0a 09 09 69 66 |.MyButto|n;....if|
|00001720| 20 28 20 28 54 61 62 53 | 74 61 63 6b 2e 4c 65 6e | ( (TabS|tack.Len|
|00001730| 67 74 68 3d 3d 31 29 20 | 7c 7c 20 28 62 46 6f 72 |gth==1) ||| (bFor|
|00001740| 63 65 41 63 74 69 76 65 | 29 20 29 0d 0a 20 20 20 |ceActive|) ).. |
|00001750| 20 20 20 20 20 7b 0d 0a | 09 09 09 41 63 74 69 76 | {..|...Activ|
|00001760| 61 74 65 54 61 62 28 4e | 65 77 54 61 62 50 61 6e |ateTab(N|ewTabPan|
|00001770| 65 6c 2e 4d 79 42 75 74 | 74 6f 6e 2c 74 72 75 65 |el.MyBut|ton,true|
|00001780| 29 3b 0d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |);.. | |
|00001790| 4e 65 77 54 61 62 50 61 | 6e 65 6c 2e 46 6f 63 75 |NewTabPa|nel.Focu|
|000017a0| 73 46 69 72 73 74 28 6e | 6f 6e 65 29 3b 0d 0a 20 |sFirst(n|one);.. |
|000017b0| 20 20 20 20 20 20 20 7d | 0d 0a 0d 0a 09 09 52 65 | }|......Re|
|000017c0| 74 75 72 6e 20 4e 65 77 | 54 61 62 50 61 6e 65 6c |turn New|TabPanel|
|000017d0| 3b 0d 0a 09 7d 0d 0a 0d | 0a 09 72 65 74 75 72 6e |;...}...|..return|
|000017e0| 20 4e 6f 6e 65 3b 0d 0a | 7d 0d 0a 0d 0a 2f 2f 20 | None;..|}....// |
|000017f0| 41 74 20 70 72 65 73 65 | 6e 74 2c 20 74 68 69 73 |At prese|nt, this|
|00001800| 20 66 75 6e 63 74 69 6f | 6e 20 63 61 75 73 65 73 | functio|n causes|
|00001810| 20 52 65 6d 61 70 43 6f | 6d 70 6f 6e 65 6e 74 73 | RemapCo|mponents|
|00001820| 28 29 20 74 6f 20 62 65 | 20 63 61 6c 6c 65 64 20 |() to be| called |
|00001830| 74 77 69 63 65 2c 0d 0a | 2f 2f 20 6f 6e 63 65 20 |twice,..|// once |
|00001840| 77 68 65 6e 20 74 68 65 | 20 6e 65 77 20 63 6f 6d |when the| new com|
|00001850| 70 6f 6e 65 6e 74 20 69 | 73 20 61 64 64 65 64 2c |ponent i|s added,|
|00001860| 20 6f 6e 63 65 20 77 68 | 65 6e 20 74 68 65 20 6f | once wh|en the o|
|00001870| 6c 64 20 69 73 20 72 65 | 6d 6f 76 65 64 0d 0a 66 |ld is re|moved..f|
|00001880| 75 6e 63 74 69 6f 6e 20 | 47 55 49 54 61 62 50 61 |unction |GUITabPa|
|00001890| 6e 65 6c 20 52 65 70 6c | 61 63 65 54 61 62 28 47 |nel Repl|aceTab(G|
|000018a0| 55 49 54 61 62 42 75 74 | 74 6f 6e 20 57 68 69 63 |UITabBut|ton Whic|
|000018b0| 68 2c 20 73 74 72 69 6e | 67 20 43 61 70 74 69 6f |h, strin|g Captio|
|000018c0| 6e 2c 20 73 74 72 69 6e | 67 20 50 61 6e 65 6c 43 |n, strin|g PanelC|
|000018d0| 6c 61 73 73 2c 20 6f 70 | 74 69 6f 6e 61 6c 20 47 |lass, op|tional G|
|000018e0| 55 49 54 61 62 50 61 6e | 65 6c 20 45 78 69 73 74 |UITabPan|el Exist|
|000018f0| 69 6e 67 50 61 6e 65 6c | 2c 20 6f 70 74 69 6f 6e |ingPanel|, option|
|00001900| 61 6c 20 73 74 72 69 6e | 67 20 48 69 6e 74 2c 20 |al strin|g Hint, |
|00001910| 6f 70 74 69 6f 6e 61 6c | 20 62 6f 6f 6c 20 62 46 |optional| bool bF|
|00001920| 6f 72 63 65 41 63 74 69 | 76 65 29 0d 0a 7b 0d 0a |orceActi|ve)..{..|
|00001930| 09 6c 6f 63 61 6c 20 63 | 6c 61 73 73 3c 47 55 49 |.local c|lass<GUI|
|00001940| 54 61 62 50 61 6e 65 6c | 3e 20 4e 65 77 50 61 6e |TabPanel|> NewPan|
|00001950| 65 6c 43 6c 61 73 73 3b | 0d 0a 0d 0a 09 6c 6f 63 |elClass;|.....loc|
|00001960| 61 6c 20 47 55 49 54 61 | 62 50 61 6e 65 6c 20 20 |al GUITa|bPanel |
|00001970| 4e 65 77 54 61 62 50 61 | 6e 65 6c 2c 20 4f 6c 64 |NewTabPa|nel, Old|
|00001980| 54 61 62 50 61 6e 65 6c | 3b 0d 0a 0d 0a 09 69 66 |TabPanel|;.....if|
|00001990| 20 28 45 78 69 73 74 69 | 6e 67 50 61 6e 65 6c 3d | (Existi|ngPanel=|
|000019a0| 3d 4e 6f 6e 65 29 0d 0a | 09 09 4e 65 77 50 61 6e |=None)..|..NewPan|
|000019b0| 65 6c 43 6c 61 73 73 20 | 3d 20 63 6c 61 73 73 3c |elClass |= class<|
|000019c0| 47 55 49 54 61 62 50 61 | 6e 65 6c 3e 28 44 79 6e |GUITabPa|nel>(Dyn|
|000019d0| 61 6d 69 63 4c 6f 61 64 | 4f 62 6a 65 63 74 28 50 |amicLoad|Object(P|
|000019e0| 61 6e 65 6c 43 6c 61 73 | 73 2c 63 6c 61 73 73 27 |anelClas|s,class'|
|000019f0| 63 6c 61 73 73 27 29 29 | 3b 0d 0a 0d 0a 09 69 66 |class'))|;.....if|
|00001a00| 20 28 20 28 45 78 69 73 | 74 69 6e 67 50 61 6e 65 | ( (Exis|tingPane|
|00001a10| 6c 21 3d 4e 6f 6e 65 29 | 20 7c 7c 20 28 4e 65 77 |l!=None)| || (New|
|00001a20| 50 61 6e 65 6c 43 6c 61 | 73 73 20 21 3d 20 4e 6f |PanelCla|ss != No|
|00001a30| 6e 65 29 20 29 0d 0a 09 | 7b 0d 0a 0d 0a 20 20 20 |ne) )...|{.... |
|00001a40| 09 09 4f 6c 64 54 61 62 | 50 61 6e 65 6c 20 3d 20 |..OldTab|Panel = |
|00001a50| 57 68 69 63 68 2e 4d 79 | 50 61 6e 65 6c 3b 0d 0a |Which.My|Panel;..|
|00001a60| 0d 0a 20 20 20 20 09 69 | 66 20 28 45 78 69 73 74 |.. .i|f (Exist|
|00001a70| 69 6e 67 50 61 6e 65 6c | 3d 3d 4e 6f 6e 65 29 0d |ingPanel|==None).|
|00001a80| 0a 09 20 20 20 20 20 20 | 20 20 4e 65 77 54 61 62 |.. | NewTab|
|00001a90| 50 61 6e 65 6c 20 3d 20 | 47 55 49 54 61 62 50 61 |Panel = |GUITabPa|
|00001aa0| 6e 65 6c 28 41 64 64 43 | 6f 6d 70 6f 6e 65 6e 74 |nel(AddC|omponent|
|00001ab0| 28 50 61 6e 65 6c 43 6c | 61 73 73 29 29 3b 0d 0a |(PanelCl|ass));..|
|00001ac0| 20 20 20 20 09 65 6c 73 | 65 0d 0a 20 20 20 20 20 | .els|e.. |
|00001ad0| 20 20 20 09 4e 65 77 54 | 61 62 50 61 6e 65 6c 20 | .NewT|abPanel |
|00001ae0| 3d 20 47 55 49 54 61 62 | 50 61 6e 65 6c 28 41 70 |= GUITab|Panel(Ap|
|00001af0| 70 65 6e 64 43 6f 6d 70 | 6f 6e 65 6e 74 28 45 78 |pendComp|onent(Ex|
|00001b00| 69 73 74 69 6e 67 50 61 | 6e 65 6c 29 29 3b 0d 0a |istingPa|nel));..|
|00001b10| 0d 0a 09 09 69 66 20 28 | 4e 65 77 54 61 62 50 61 |....if (|NewTabPa|
|00001b20| 6e 65 6c 3d 3d 4e 6f 6e | 65 29 0d 0a 09 09 7b 0d |nel==Non|e)....{.|
|00001b30| 0a 09 09 09 6c 6f 67 28 | 22 43 6f 75 6c 64 20 6e |....log(|"Could n|
|00001b40| 6f 74 20 63 72 65 61 74 | 65 20 70 61 6e 65 6c 22 |ot creat|e panel"|
|00001b50| 40 4e 65 77 50 61 6e 65 | 6c 43 6c 61 73 73 29 3b |@NewPane|lClass);|
|00001b60| 0d 0a 09 09 09 72 65 74 | 75 72 6e 20 6e 6f 6e 65 |.....ret|urn none|
|00001b70| 3b 0d 0a 09 09 7d 0d 0a | 0d 0a 09 09 57 68 69 63 |;....}..|....Whic|
|00001b80| 68 2e 43 61 70 74 69 6f | 6e 09 09 09 3d 20 43 61 |h.Captio|n...= Ca|
|00001b90| 70 74 69 6f 6e 3b 0d 0a | 09 09 57 68 69 63 68 2e |ption;..|..Which.|
|00001ba0| 48 69 6e 74 09 09 09 09 | 3d 20 48 69 6e 74 3b 0d |Hint....|= Hint;.|
|00001bb0| 0a 09 09 57 68 69 63 68 | 2e 4d 79 50 61 6e 65 6c |...Which|.MyPanel|
|00001bc0| 09 09 09 3d 20 4e 65 77 | 54 61 62 50 61 6e 65 6c |...= New|TabPanel|
|00001bd0| 3b 0d 0a 09 09 4e 65 77 | 54 61 62 50 61 6e 65 6c |;....New|TabPanel|
|00001be0| 2e 4d 79 42 75 74 74 6f | 6e 09 3d 20 57 68 69 63 |.MyButto|n.= Whic|
|00001bf0| 68 3b 0d 0a 0d 0a 09 20 | 20 20 20 2f 2f 20 49 6e |h;..... | // In|
|00001c00| 69 74 20 6e 65 77 20 70 | 61 6e 65 6c 0d 0a 20 20 |it new p|anel.. |
|00001c10| 20 20 09 4e 65 77 54 61 | 62 50 61 6e 65 6c 2e 49 | .NewTa|bPanel.I|
|00001c20| 6e 69 74 50 61 6e 65 6c | 28 29 3b 0d 0a 09 20 20 |nitPanel|();... |
|00001c30| 20 20 4e 65 77 54 61 62 | 50 61 6e 65 6c 2e 48 69 | NewTab|Panel.Hi|
|00001c40| 64 65 28 29 3b 0d 0a 0d | 0a 09 09 2f 2f 20 4d 61 |de();...|...// Ma|
|00001c50| 6b 65 20 73 75 72 65 20 | 74 6f 20 6e 6f 74 69 66 |ke sure |to notif|
|00001c60| 79 20 6f 6c 64 20 74 61 | 62 20 2d 20 73 6f 20 75 |y old ta|b - so u|
|00001c70| 73 65 20 41 63 74 69 76 | 61 74 65 54 61 62 0d 0a |se Activ|ateTab..|
|00001c80| 09 09 69 66 20 28 20 62 | 46 6f 72 63 65 41 63 74 |..if ( b|ForceAct|
|00001c90| 69 76 65 20 29 0d 0a 09 | 09 09 41 63 74 69 76 61 |ive )...|..Activa|
|00001ca0| 74 65 54 61 62 28 4e 65 | 77 54 61 62 50 61 6e 65 |teTab(Ne|wTabPane|
|00001cb0| 6c 2e 4d 79 42 75 74 74 | 6f 6e 2c 20 54 72 75 65 |l.MyButt|on, True|
|00001cc0| 29 3b 0d 0a 0d 0a 09 09 | 2f 2f 20 4e 6f 74 69 66 |);......|// Notif|
|00001cd0| 79 20 6f 6c 64 20 70 61 | 6e 65 6c 0d 0a 09 20 20 |y old pa|nel... |
|00001ce0| 20 20 4f 6c 64 54 61 62 | 50 61 6e 65 6c 2e 4f 6e | OldTab|Panel.On|
|00001cf0| 44 65 73 74 72 6f 79 50 | 61 6e 65 6c 28 54 72 75 |DestroyP|anel(Tru|
|00001d00| 65 29 3b 0d 0a 09 09 52 | 65 6d 6f 76 65 43 6f 6d |e);....R|emoveCom|
|00001d10| 70 6f 6e 65 6e 74 28 4f | 6c 64 54 61 62 50 61 6e |ponent(O|ldTabPan|
|00001d20| 65 6c 29 3b 0d 0a 0d 0a | 09 09 72 65 74 75 72 6e |el);....|..return|
|00001d30| 20 4e 65 77 54 61 62 50 | 61 6e 65 6c 3b 0d 0a 0d | NewTabP|anel;...|
|00001d40| 0a 09 7d 0d 0a 09 65 6c | 73 65 0d 0a 09 09 72 65 |..}...el|se....re|
|00001d50| 74 75 72 6e 20 6e 6f 6e | 65 3b 0d 0a 7d 0d 0a 0d |turn non|e;..}...|
|00001d60| 0a 66 75 6e 63 74 69 6f | 6e 20 52 65 6d 6f 76 65 |.functio|n Remove|
|00001d70| 54 61 62 28 6f 70 74 69 | 6f 6e 61 6c 20 73 74 72 |Tab(opti|onal str|
|00001d80| 69 6e 67 20 43 61 70 74 | 69 6f 6e 2c 20 6f 70 74 |ing Capt|ion, opt|
|00001d90| 69 6f 6e 61 6c 20 47 55 | 49 54 61 62 42 75 74 74 |ional GU|ITabButt|
|00001da0| 6f 6e 20 77 68 6f 29 0d | 0a 7b 0d 0a 09 6c 6f 63 |on who).|.{...loc|
|00001db0| 61 6c 20 69 6e 74 20 69 | 3b 0d 0a 0d 0a 09 69 66 |al int i|;.....if|
|00001dc0| 20 28 20 28 63 61 70 74 | 69 6f 6e 3d 3d 22 22 29 | ( (capt|ion=="")|
|00001dd0| 20 26 26 20 28 57 68 6f | 3d 3d 4e 6f 6e 65 29 20 | && (Who|==None) |
|00001de0| 29 0d 0a 09 09 72 65 74 | 75 72 6e 3b 0d 0a 0d 0a |)....ret|urn;....|
|00001df0| 09 69 66 20 28 57 68 6f | 3d 3d 4e 6f 6e 65 29 0d |.if (Who|==None).|
|00001e00| 0a 09 09 69 20 3d 20 54 | 61 62 49 6e 64 65 78 28 |...i = T|abIndex(|
|00001e10| 43 61 70 74 69 6f 6e 29 | 3b 0d 0a 09 65 6c 73 65 |Caption)|;...else|
|00001e20| 20 69 20 3d 20 54 61 62 | 49 6e 64 65 78 28 57 68 | i = Tab|Index(Wh|
|00001e30| 6f 2e 43 61 70 74 69 6f | 6e 29 3b 0d 0a 0d 0a 09 |o.Captio|n);.....|
|00001e40| 69 66 20 28 69 20 3c 20 | 30 29 0d 0a 09 09 72 65 |if (i < |0)....re|
|00001e50| 74 75 72 6e 3b 0d 0a 0d | 0a 09 69 66 20 28 54 61 |turn;...|..if (Ta|
|00001e60| 62 53 74 61 63 6b 5b 69 | 5d 20 3d 3d 20 41 63 74 |bStack[i|] == Act|
|00001e70| 69 76 65 54 61 62 29 0d | 0a 09 09 4c 6f 73 74 41 |iveTab).|...LostA|
|00001e80| 63 74 69 76 65 54 61 62 | 28 29 3b 0d 0a 0d 0a 09 |ctiveTab|();.....|
|00001e90| 54 61 62 53 74 61 63 6b | 5b 69 5d 2e 4f 6e 43 6c |TabStack|[i].OnCl|
|00001ea0| 69 63 6b 20 3d 20 4e 6f | 6e 65 3b 0d 0a 09 54 61 |ick = No|ne;...Ta|
|00001eb0| 62 53 74 61 63 6b 5b 69 | 5d 2e 4d 79 50 61 6e 65 |bStack[i|].MyPane|
|00001ec0| 6c 2e 4f 6e 44 65 73 74 | 72 6f 79 50 61 6e 65 6c |l.OnDest|royPanel|
|00001ed0| 28 54 72 75 65 29 3b 0d | 0a 09 54 61 62 53 74 61 |(True);.|..TabSta|
|00001ee0| 63 6b 2e 52 65 6d 6f 76 | 65 28 69 2c 31 29 3b 0d |ck.Remov|e(i,1);.|
|00001ef0| 0a 09 52 65 6d 6f 76 65 | 43 6f 6d 70 6f 6e 65 6e |..Remove|Componen|
|00001f00| 74 28 54 61 62 53 74 61 | 63 6b 5b 69 5d 2e 4d 79 |t(TabSta|ck[i].My|
|00001f10| 50 61 6e 65 6c 29 3b 0d | 0a 7d 0d 0a 0d 0a 66 75 |Panel);.|.}....fu|
|00001f20| 6e 63 74 69 6f 6e 20 62 | 6f 6f 6c 20 4c 6f 73 74 |nction b|ool Lost|
|00001f30| 41 63 74 69 76 65 54 61 | 62 28 29 0d 0a 7b 0d 0a |ActiveTa|b()..{..|
|00001f40| 09 6c 6f 63 61 6c 20 69 | 6e 74 20 69 3b 0d 0a 0d |.local i|nt i;...|
|00001f50| 0a 09 66 6f 72 20 28 69 | 20 3d 20 30 3b 20 69 20 |..for (i| = 0; i |
|00001f60| 3c 20 54 61 62 53 74 61 | 63 6b 2e 4c 65 6e 67 74 |< TabSta|ck.Lengt|
|00001f70| 68 3b 20 69 2b 2b 29 0d | 0a 09 09 69 66 20 28 41 |h; i++).|...if (A|
|00001f80| 63 74 69 76 61 74 65 54 | 61 62 28 54 61 62 53 74 |ctivateT|ab(TabSt|
|00001f90| 61 63 6b 5b 69 5d 2c 74 | 72 75 65 29 29 0d 0a 09 |ack[i],t|rue))...|
|00001fa0| 09 09 72 65 74 75 72 6e | 20 74 72 75 65 3b 0d 0a |..return| true;..|
|00001fb0| 0d 0a 09 72 65 74 75 72 | 6e 20 66 61 6c 73 65 3b |...retur|n false;|
|00001fc0| 0d 0a 7d 0d 0a 0d 0a 66 | 75 6e 63 74 69 6f 6e 20 |..}....f|unction |
|00001fd0| 62 6f 6f 6c 20 41 63 74 | 69 76 61 74 65 54 61 62 |bool Act|ivateTab|
|00001fe0| 28 47 55 49 54 61 62 42 | 75 74 74 6f 6e 20 57 68 |(GUITabB|utton Wh|
|00001ff0| 6f 2c 20 62 6f 6f 6c 20 | 62 46 6f 63 75 73 50 61 |o, bool |bFocusPa|
|00002000| 6e 65 6c 29 0d 0a 7b 0d | 0a 09 69 66 20 28 57 68 |nel)..{.|..if (Wh|
|00002010| 6f 20 3d 3d 20 6e 6f 6e | 65 20 7c 7c 20 21 57 68 |o == non|e || !Wh|
|00002020| 6f 2e 43 61 6e 53 68 6f | 77 50 61 6e 65 6c 28 29 |o.CanSho|wPanel()|
|00002030| 29 09 09 2f 2f 20 6e 75 | 6c 6c 20 6f 72 20 6e 6f |)..// nu|ll or no|
|00002040| 74 20 73 65 6c 65 63 74 | 61 62 6c 65 0d 0a 09 09 |t select|able....|
|00002050| 72 65 74 75 72 6e 20 66 | 61 6c 73 65 3b 0d 0a 0d |return f|alse;...|
|00002060| 0a 09 69 66 20 28 57 68 | 6f 3d 3d 41 63 74 69 76 |..if (Wh|o==Activ|
|00002070| 65 54 61 62 29 09 2f 2f | 20 53 61 6d 65 20 54 61 |eTab).//| Same Ta|
|00002080| 62 2c 20 6a 75 73 74 20 | 61 63 63 65 70 74 0d 0a |b, just |accept..|
|00002090| 09 09 72 65 74 75 72 6e | 20 74 72 75 65 3b 0d 0a |..return| true;..|
|000020a0| 0d 0a 09 2f 2f 20 44 65 | 61 63 74 69 76 61 74 65 |...// De|activate|
|000020b0| 20 74 68 65 20 41 63 74 | 69 76 65 20 74 61 62 0d | the Act|ive tab.|
|000020c0| 0a 09 69 66 20 28 41 63 | 74 69 76 65 54 61 62 20 |..if (Ac|tiveTab |
|000020d0| 21 3d 20 4e 6f 6e 65 29 | 0d 0a 09 7b 0d 0a 09 09 |!= None)|...{....|
|000020e0| 41 63 74 69 76 65 54 61 | 62 2e 62 41 63 74 69 76 |ActiveTa|b.bActiv|
|000020f0| 65 20 3d 20 46 61 6c 73 | 65 3b 0d 0a 09 09 69 66 |e = Fals|e;....if|
|00002100| 20 28 41 63 74 69 76 65 | 54 61 62 2e 4d 79 50 61 | (Active|Tab.MyPa|
|00002110| 6e 65 6c 20 21 3d 20 4e | 6f 6e 65 29 0d 0a 09 09 |nel != N|one)....|
|00002120| 09 41 63 74 69 76 65 54 | 61 62 2e 4d 79 50 61 6e |.ActiveT|ab.MyPan|
|00002130| 65 6c 2e 53 68 6f 77 50 | 61 6e 65 6c 28 46 61 6c |el.ShowP|anel(Fal|
|00002140| 73 65 29 3b 0d 0a 09 7d | 0d 0a 0d 0a 09 2f 2f 20 |se);...}|.....// |
|00002150| 53 65 74 20 74 68 65 20 | 6e 65 77 20 61 63 74 69 |Set the |new acti|
|00002160| 76 65 20 54 61 62 0d 0a | 09 41 63 74 69 76 65 54 |ve Tab..|.ActiveT|
|00002170| 61 62 20 3d 20 57 68 6f | 3b 0d 0a 09 57 68 6f 2e |ab = Who|;...Who.|
|00002180| 62 41 63 74 69 76 65 20 | 3d 20 54 72 75 65 3b 0d |bActive |= True;.|
|00002190| 0a 09 57 68 6f 2e 4d 79 | 50 61 6e 65 6c 2e 53 68 |..Who.My|Panel.Sh|
|000021a0| 6f 77 50 61 6e 65 6c 28 | 62 46 6f 63 75 73 50 61 |owPanel(|bFocusPa|
|000021b0| 6e 65 6c 29 3b 0d 0a 09 | 4f 6e 43 68 61 6e 67 65 |nel);...|OnChange|
|000021c0| 28 57 68 6f 29 3b 0d 0a | 0d 0a 09 72 65 74 75 72 |(Who);..|...retur|
|000021d0| 6e 20 74 72 75 65 3b 0d | 0a 7d 0d 0a 0d 0a 66 75 |n true;.|.}....fu|
|000021e0| 6e 63 74 69 6f 6e 20 62 | 6f 6f 6c 20 41 63 74 69 |nction b|ool Acti|
|000021f0| 76 61 74 65 54 61 62 42 | 79 4e 61 6d 65 28 73 74 |vateTabB|yName(st|
|00002200| 72 69 6e 67 20 74 61 62 | 6e 61 6d 65 2c 20 62 6f |ring tab|name, bo|
|00002210| 6f 6c 20 62 46 6f 63 75 | 73 50 61 6e 65 6c 29 0d |ol bFocu|sPanel).|
|00002220| 0a 7b 0d 0a 09 6c 6f 63 | 61 6c 20 69 6e 74 20 69 |.{...loc|al int i|
|00002230| 3b 0d 0a 0d 0a 09 69 20 | 3d 20 54 61 62 49 6e 64 |;.....i |= TabInd|
|00002240| 65 78 28 54 61 62 4e 61 | 6d 65 29 3b 0d 0a 09 69 |ex(TabNa|me);...i|
|00002250| 66 20 28 69 20 3c 20 30 | 20 7c 7c 20 69 20 3e 3d |f (i < 0| || i >=|
|00002260| 20 54 61 62 53 74 61 63 | 6b 2e 4c 65 6e 67 74 68 | TabStac|k.Length|
|00002270| 29 20 72 65 74 75 72 6e | 20 66 61 6c 73 65 3b 0d |) return| false;.|
|00002280| 0a 09 65 6c 73 65 20 72 | 65 74 75 72 6e 20 41 63 |..else r|eturn Ac|
|00002290| 74 69 76 61 74 65 54 61 | 62 28 54 61 62 53 74 61 |tivateTa|b(TabSta|
|000022a0| 63 6b 5b 69 5d 2c 20 62 | 46 6f 63 75 73 50 61 6e |ck[i], b|FocusPan|
|000022b0| 65 6c 29 3b 0d 0a 7d 0d | 0a 0d 0a 66 75 6e 63 74 |el);..}.|...funct|
|000022c0| 69 6f 6e 20 62 6f 6f 6c | 20 49 6e 74 65 72 6e 61 |ion bool| Interna|
|000022d0| 6c 54 61 62 43 6c 69 63 | 6b 28 47 55 49 43 6f 6d |lTabClic|k(GUICom|
|000022e0| 70 6f 6e 65 6e 74 20 53 | 65 6e 64 65 72 29 0d 0a |ponent S|ender)..|
|000022f0| 7b 0d 0a 09 6c 6f 63 61 | 6c 20 47 55 49 54 61 62 |{...loca|l GUITab|
|00002300| 42 75 74 74 6f 6e 20 42 | 75 74 3b 0d 0a 0d 0a 09 |Button B|ut;.....|
|00002310| 42 75 74 20 3d 20 47 55 | 49 54 61 62 42 75 74 74 |But = GU|ITabButt|
|00002320| 6f 6e 28 53 65 6e 64 65 | 72 29 3b 0d 0a 09 69 66 |on(Sende|r);...if|
|00002330| 20 28 42 75 74 3d 3d 4e | 6f 6e 65 29 0d 0a 09 09 | (But==N|one)....|
|00002340| 72 65 74 75 72 6e 20 66 | 61 6c 73 65 3b 0d 0a 0d |return f|alse;...|
|00002350| 0a 09 41 63 74 69 76 61 | 74 65 54 61 62 28 42 75 |..Activa|teTab(Bu|
|00002360| 74 2c 74 72 75 65 29 3b | 0d 0a 20 20 20 20 69 66 |t,true);|.. if|
|00002370| 20 28 41 63 74 69 76 65 | 54 61 62 21 3d 4e 6f 6e | (Active|Tab!=Non|
|00002380| 65 20 26 26 20 41 63 74 | 69 76 65 54 61 62 2e 4d |e && Act|iveTab.M|
|00002390| 79 50 61 6e 65 6c 21 3d | 4e 6f 6e 65 29 0d 0a 20 |yPanel!=|None).. |
|000023a0| 20 20 20 09 41 63 74 69 | 76 65 54 61 62 2e 4d 79 | .Acti|veTab.My|
|000023b0| 50 61 6e 65 6c 2e 46 6f | 63 75 73 46 69 72 73 74 |Panel.Fo|cusFirst|
|000023c0| 28 6e 6f 6e 65 29 3b 0d | 0a 0d 0a 09 72 65 74 75 |(none);.|....retu|
|000023d0| 72 6e 20 74 72 75 65 3b | 0d 0a 7d 0d 0a 0d 0a 65 |rn true;|..}....e|
|000023e0| 76 65 6e 74 20 62 6f 6f | 6c 20 4e 65 78 74 50 61 |vent boo|l NextPa|
|000023f0| 67 65 28 29 0d 0a 7b 0d | 0a 09 6c 6f 63 61 6c 20 |ge()..{.|..local |
|00002400| 69 6e 74 20 69 3b 0d 0a | 0d 0a 09 2f 2f 20 49 66 |int i;..|...// If|
|00002410| 20 31 20 6f 72 20 6e 6f | 20 74 61 62 73 20 69 6e | 1 or no| tabs in|
|00002420| 20 74 68 65 20 73 74 61 | 63 6b 2c 20 74 68 65 6e | the sta|ck, then|
|00002430| 20 71 75 65 72 79 20 70 | 61 72 65 6e 74 73 0d 0a | query p|arents..|
|00002440| 09 69 66 20 28 54 61 62 | 53 74 61 63 6b 2e 4c 65 |.if (Tab|Stack.Le|
|00002450| 6e 67 74 68 20 3c 20 32 | 29 0d 0a 09 09 72 65 74 |ngth < 2|)....ret|
|00002460| 75 72 6e 20 53 75 70 65 | 72 2e 4e 65 78 74 50 61 |urn Supe|r.NextPa|
|00002470| 67 65 28 29 3b 0d 0a 0d | 0a 09 69 66 20 28 41 63 |ge();...|..if (Ac|
|00002480| 74 69 76 65 54 61 62 20 | 3d 3d 20 4e 6f 6e 65 29 |tiveTab |== None)|
|00002490| 0d 0a 09 09 69 20 3d 20 | 30 3b 0d 0a 09 65 6c 73 |....i = |0;...els|
|000024a0| 65 0d 0a 09 7b 0d 0a 09 | 09 69 20 3d 20 54 61 62 |e...{...|.i = Tab|
|000024b0| 49 6e 64 65 78 28 41 63 | 74 69 76 65 54 61 62 2e |Index(Ac|tiveTab.|
|000024c0| 43 61 70 74 69 6f 6e 29 | 20 2b 20 31 3b 0d 0a 09 |Caption)| + 1;...|
|000024d0| 09 69 66 20 28 20 69 20 | 3e 3d 20 54 61 62 53 74 |.if ( i |>= TabSt|
|000024e0| 61 63 6b 2e 4c 65 6e 67 | 74 68 20 29 0d 0a 09 09 |ack.Leng|th )....|
|000024f0| 09 69 20 3d 20 30 3b 0d | 0a 09 7d 0d 0a 09 72 65 |.i = 0;.|..}...re|
|00002500| 74 75 72 6e 20 41 63 74 | 69 76 61 74 65 54 61 62 |turn Act|ivateTab|
|00002510| 28 54 61 62 53 74 61 63 | 6b 5b 69 5d 2c 20 74 72 |(TabStac|k[i], tr|
|00002520| 75 65 29 3b 0d 0a 7d 0d | 0a 0d 0a 65 76 65 6e 74 |ue);..}.|...event|
|00002530| 20 62 6f 6f 6c 20 50 72 | 65 76 50 61 67 65 28 29 | bool Pr|evPage()|
|00002540| 0d 0a 7b 0d 0a 09 6c 6f | 63 61 6c 20 69 6e 74 20 |..{...lo|cal int |
|00002550| 69 3b 0d 0a 0d 0a 09 69 | 66 20 28 54 61 62 53 74 |i;.....i|f (TabSt|
|00002560| 61 63 6b 2e 4c 65 6e 67 | 74 68 20 3c 20 32 29 0d |ack.Leng|th < 2).|
|00002570| 0a 09 09 72 65 74 75 72 | 6e 20 53 75 70 65 72 2e |...retur|n Super.|
|00002580| 4e 65 78 74 50 61 67 65 | 28 29 3b 0d 0a 0d 0a 09 |NextPage|();.....|
|00002590| 69 66 20 28 41 63 74 69 | 76 65 54 61 62 20 3d 3d |if (Acti|veTab ==|
|000025a0| 20 4e 6f 6e 65 29 0d 0a | 09 09 69 20 3d 20 54 61 | None)..|..i = Ta|
|000025b0| 62 53 74 61 63 6b 2e 4c | 65 6e 67 74 68 20 2d 20 |bStack.L|ength - |
|000025c0| 31 3b 0d 0a 09 65 6c 73 | 65 0d 0a 09 7b 0d 0a 09 |1;...els|e...{...|
|000025d0| 09 69 20 3d 20 54 61 62 | 49 6e 64 65 78 28 41 63 |.i = Tab|Index(Ac|
|000025e0| 74 69 76 65 54 61 62 2e | 43 61 70 74 69 6f 6e 29 |tiveTab.|Caption)|
|000025f0| 20 2d 20 31 3b 0d 0a 09 | 09 69 66 20 28 20 69 20 | - 1;...|.if ( i |
|00002600| 3c 20 30 20 29 0d 0a 09 | 09 09 69 20 3d 20 54 61 |< 0 )...|..i = Ta|
|00002610| 62 53 74 61 63 6b 2e 4c | 65 6e 67 74 68 20 2d 20 |bStack.L|ength - |
|00002620| 31 3b 0d 0a 09 7d 0d 0a | 09 72 65 74 75 72 6e 20 |1;...}..|.return |
|00002630| 41 63 74 69 76 61 74 65 | 54 61 62 28 54 61 62 53 |Activate|Tab(TabS|
|00002640| 74 61 63 6b 5b 69 5d 2c | 20 74 72 75 65 29 3b 0d |tack[i],| true);.|
|00002650| 0a 7d 0d 0a 0d 0a 65 76 | 65 6e 74 20 53 65 74 46 |.}....ev|ent SetF|
|00002660| 6f 63 75 73 28 47 55 49 | 43 6f 6d 70 6f 6e 65 6e |ocus(GUI|Componen|
|00002670| 74 20 57 68 6f 29 0d 0a | 7b 0d 0a 09 69 66 20 28 |t Who)..|{...if (|
|00002680| 57 68 6f 3d 3d 4e 6f 6e | 65 29 0d 0a 09 7b 0d 0a |Who==Non|e)...{..|
|00002690| 20 20 20 20 09 69 66 20 | 28 43 6f 6e 74 72 6f 6c | .if |(Control|
|000026a0| 6c 65 72 2e 46 6f 63 75 | 73 65 64 43 6f 6e 74 72 |ler.Focu|sedContr|
|000026b0| 6f 6c 21 3d 4e 6f 6e 65 | 20 26 26 20 43 6f 6e 74 |ol!=None| && Cont|
|000026c0| 72 6f 6c 6c 65 72 2e 46 | 6f 63 75 73 65 64 43 6f |roller.F|ocusedCo|
|000026d0| 6e 74 72 6f 6c 21 3d 53 | 65 6c 66 29 0d 0a 20 20 |ntrol!=S|elf).. |
|000026e0| 20 20 20 20 20 20 7b 0d | 0a 20 20 20 20 20 20 20 | {.|. |
|000026f0| 20 09 53 75 70 65 72 28 | 47 55 49 43 6f 6d 70 6f | .Super(|GUICompo|
|00002700| 6e 65 6e 74 29 2e 53 65 | 74 46 6f 63 75 73 28 57 |nent).Se|tFocus(W|
|00002710| 68 6f 29 3b 0d 0a 20 20 | 20 20 20 20 20 20 20 20 |ho);.. | |
|00002720| 20 20 72 65 74 75 72 6e | 3b 0d 0a 20 20 20 20 20 | return|;.. |
|00002730| 20 20 20 7d 0d 0a 20 20 | 20 20 20 20 20 20 65 6c | }.. | el|
|00002740| 73 65 0d 0a 20 20 20 20 | 20 20 20 20 7b 0d 0a 09 |se.. | {...|
|00002750| 09 09 46 6f 63 75 73 46 | 69 72 73 74 28 4e 6f 6e |..FocusF|irst(Non|
|00002760| 65 29 3b 0d 0a 20 20 20 | 20 20 20 20 20 7d 0d 0a |e);.. | }..|
|00002770| 0d 0a 09 09 72 65 74 75 | 72 6e 3b 0d 0a 09 7d 0d |....retu|rn;...}.|
|00002780| 0a 20 20 20 20 53 75 70 | 65 72 2e 53 65 74 46 6f |. Sup|er.SetFo|
|00002790| 63 75 73 28 57 68 6f 29 | 3b 0d 0a 7d 0d 0a 0d 0a |cus(Who)|;..}....|
|000027a0| 65 76 65 6e 74 20 62 6f | 6f 6c 20 4e 65 78 74 43 |event bo|ol NextC|
|000027b0| 6f 6e 74 72 6f 6c 28 47 | 55 49 43 6f 6d 70 6f 6e |ontrol(G|UICompon|
|000027c0| 65 6e 74 20 53 65 6e 64 | 65 72 29 0d 0a 7b 0d 0a |ent Send|er)..{..|
|000027d0| 0d 0a 09 69 66 20 28 53 | 65 6e 64 65 72 21 3d 4e |...if (S|ender!=N|
|000027e0| 6f 6e 65 20 26 26 20 53 | 65 6e 64 65 72 2e 4d 65 |one && S|ender.Me|
|000027f0| 6e 75 4f 77 6e 65 72 3d | 3d 73 65 6c 66 29 0d 0a |nuOwner=|=self)..|
|00002800| 20 20 20 20 09 72 65 74 | 75 72 6e 20 53 75 70 65 | .ret|urn Supe|
|00002810| 72 28 47 55 49 43 6f 6d | 70 6f 6e 65 6e 74 29 2e |r(GUICom|ponent).|
|00002820| 4e 65 78 74 43 6f 6e 74 | 72 6f 6c 28 53 65 6e 64 |NextCont|rol(Send|
|00002830| 65 72 29 3b 0d 0a 20 20 | 20 20 65 6c 73 65 0d 0a |er);.. | else..|
|00002840| 20 20 20 20 09 46 6f 63 | 75 73 46 69 72 73 74 28 | .Foc|usFirst(|
|00002850| 4e 6f 6e 65 29 3b 0d 0a | 0d 0a 20 20 20 20 72 65 |None);..|.. re|
|00002860| 74 75 72 6e 20 74 72 75 | 65 3b 0d 0a 7d 0d 0a 0d |turn tru|e;..}...|
|00002870| 0a 65 76 65 6e 74 20 62 | 6f 6f 6c 20 50 72 65 76 |.event b|ool Prev|
|00002880| 43 6f 6e 74 72 6f 6c 28 | 47 55 49 43 6f 6d 70 6f |Control(|GUICompo|
|00002890| 6e 65 6e 74 20 53 65 6e | 64 65 72 29 0d 0a 7b 0d |nent Sen|der)..{.|
|000028a0| 0a 0d 0a 09 69 66 20 28 | 53 65 6e 64 65 72 21 3d |....if (|Sender!=|
|000028b0| 4e 6f 6e 65 20 26 26 20 | 53 65 6e 64 65 72 2e 4d |None && |Sender.M|
|000028c0| 65 6e 75 4f 77 6e 65 72 | 3d 3d 73 65 6c 66 29 0d |enuOwner|==self).|
|000028d0| 0a 20 20 20 20 7b 0d 0a | 20 20 20 20 09 53 65 74 |. {..| .Set|
|000028e0| 46 6f 63 75 73 28 4e 6f | 6e 65 29 3b 0d 0a 20 20 |Focus(No|ne);.. |
|000028f0| 20 20 20 20 20 20 72 65 | 74 75 72 6e 20 74 72 75 | re|turn tru|
|00002900| 65 3b 0d 0a 20 20 20 20 | 7d 0d 0a 20 20 20 20 65 |e;.. |}.. e|
|00002910| 6c 73 65 20 69 66 20 28 | 53 65 6e 64 65 72 3d 3d |lse if (|Sender==|
|00002920| 4e 6f 6e 65 29 0d 0a 20 | 20 20 20 09 72 65 74 75 |None).. | .retu|
|00002930| 72 6e 20 53 75 70 65 72 | 28 47 55 49 43 6f 6d 70 |rn Super|(GUIComp|
|00002940| 6f 6e 65 6e 74 29 2e 50 | 72 65 76 43 6f 6e 74 72 |onent).P|revContr|
|00002950| 6f 6c 28 53 65 6e 64 65 | 72 29 3b 0d 0a 20 20 20 |ol(Sende|r);.. |
|00002960| 20 65 6c 73 65 0d 0a 20 | 20 20 20 09 46 6f 63 75 | else.. | .Focu|
|00002970| 73 4c 61 73 74 28 4e 6f | 6e 65 29 3b 0d 0a 0d 0a |sLast(No|ne);....|
|00002980| 20 20 20 20 72 65 74 75 | 72 6e 20 74 72 75 65 3b | retu|rn true;|
|00002990| 0d 0a 0d 0a 7d 0d 0a 0d | 0a 66 75 6e 63 74 69 6f |....}...|.functio|
|000029a0| 6e 20 69 6e 74 20 54 61 | 62 49 6e 64 65 78 28 73 |n int Ta|bIndex(s|
|000029b0| 74 72 69 6e 67 20 54 61 | 62 4e 61 6d 65 29 0d 0a |tring Ta|bName)..|
|000029c0| 7b 0d 0a 09 6c 6f 63 61 | 6c 20 69 6e 74 20 69 3b |{...loca|l int i;|
|000029d0| 0d 0a 0d 0a 09 66 6f 72 | 20 28 69 20 3d 20 30 3b |.....for| (i = 0;|
|000029e0| 20 69 20 3c 20 54 61 62 | 53 74 61 63 6b 2e 4c 65 | i < Tab|Stack.Le|
|000029f0| 6e 67 74 68 3b 20 69 2b | 2b 29 0d 0a 09 09 69 66 |ngth; i+|+)....if|
|00002a00| 20 28 54 61 62 53 74 61 | 63 6b 5b 69 5d 2e 43 61 | (TabSta|ck[i].Ca|
|00002a10| 70 74 69 6f 6e 20 7e 3d | 20 54 61 62 4e 61 6d 65 |ption ~=| TabName|
|00002a20| 29 0d 0a 09 09 09 72 65 | 74 75 72 6e 20 69 3b 0d |).....re|turn i;.|
|00002a30| 0a 0d 0a 09 72 65 74 75 | 72 6e 20 2d 31 3b 0d 0a |....retu|rn -1;..|
|00002a40| 7d 0d 0a 0d 0a 00 | |}..... | |
+--------+-------------------------+-------------------------+--------+--------+